{extend name="property/public/insidePageBase" /}
{block name="title"}添加智能电表{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-form layui-form-pane">
            <div class="layui-row">
                <div class="layui-col-xs5">
                    <div class="layui-form-item">
                        <label class="layui-form-label indispensable">设备编号</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$info['energy_no']??'虚拟设备'}"  disabled autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs7">
                    <div class="layui-form-item">
                        <label class="layui-form-label indispensable">安装地址</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$info['energy_name']??'--'}" {if $info['energy_id'] > 0}disabled {/if} autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
            {if isset($info['plan_record'])}
            {if $info['plan_record']['mode_type'] == 2}
                <div class="layui-form-item">
                    <div class="layui-input-group start-end-time">
                        <div class="layui-input-split layui-input-prefix">&nbsp;&nbsp;基本价&nbsp;&nbsp;&nbsp;&nbsp;</div>
                        <div class="layui-input-split layui-input-prefix">尖</div>
                        <input type="text" value="{$info['plan_record']['basic_price_j']??'--'}" disabled autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">¥/度</div>
                        <div class="layui-input-split layui-input-suffix">峰</div>
                        <input type="text" value="{$info['plan_record']['basic_price_f']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">¥/度</div>
                        <div class="layui-input-split layui-input-suffix">平</div>
                        <input type="text" value="{$info['plan_record']['basic_price_p']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">¥/度</div>
                        <div class="layui-input-split layui-input-suffix">谷</div>
                        <input type="text" value="{$info['plan_record']['basic_price_g']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">¥/度</div>
                    </div>
                </div>
                {if $info['plan_record']['service_switch'] == 1}
                <div class="layui-form-item">
                    <div class="layui-input-group start-end-time">
                        <div class="layui-input-split layui-input-prefix">&nbsp;&nbsp;{$info['plan_record']['service_name']??'--'}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                        <div class="layui-input-split layui-input-prefix">尖</div>
                        <input type="text" value="{$info['plan_record']['service_price_j']??'--'}" disabled autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">¥/度</div>
                        <div class="layui-input-split layui-input-suffix">峰</div>
                        <input type="text" value="{$info['plan_record']['service_price_f']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">¥/度</div>
                        <div class="layui-input-split layui-input-suffix">平</div>
                        <input type="text" value="{$info['plan_record']['service_price_p']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">¥/度</div>
                        <div class="layui-input-split layui-input-suffix">谷</div>
                        <input type="text" value="{$info['plan_record']['service_price_g']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">¥/度</div>
                    </div>
                </div>
                {/if}
                <div class="layui-form-item">
                    <div class="layui-input-group start-end-time">
                        <div class="layui-input-split layui-input-prefix">&nbsp;&nbsp;尖&nbsp;&nbsp;&nbsp;&nbsp;</div>
                        <div class="layui-input-split layui-input-prefix">本期读数</div>
                        <input type="text" name="end_num_j" value="{$info['end_num_j']??'--'}" autocomplete="off" class="layui-input">

                        <div class="layui-input-split layui-input-suffix">上期底数</div>
                        <input type="text" name="start_num_j" value="{$info['start_num_j']??'--'}" autocomplete="off" class="layui-input">

                        <div class="layui-input-split layui-input-suffix">本期用量</div>
                        <input type="text" value="{$info['use_num_j']??'--'}" disabled autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">度</div>

                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-group start-end-time">
                        <div class="layui-input-split layui-input-prefix">&nbsp;&nbsp;峰&nbsp;&nbsp;&nbsp;&nbsp;</div>
                        <div class="layui-input-split layui-input-prefix">本期读数</div>
                        <input type="text" name="end_num_f" value="{$info['end_num_f']??'--'}" autocomplete="off" class="layui-input">

                        <div class="layui-input-split layui-input-suffix">上期底数</div>
                        <input type="text" name="start_num_f" value="{$info['start_num_f']??'--'}" autocomplete="off" class="layui-input">

                        <div class="layui-input-split layui-input-suffix">本期用量</div>
                        <input type="text" value="{$info['use_num_f']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">度</div>

                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-group start-end-time">
                        <div class="layui-input-split layui-input-prefix">&nbsp;&nbsp;平&nbsp;&nbsp;&nbsp;&nbsp;</div>
                        <div class="layui-input-split layui-input-prefix">本期读数</div>
                        <input type="text" name="end_num_p" value="{$info['end_num_p']??'--'}" autocomplete="off" class="layui-input">

                        <div class="layui-input-split layui-input-suffix">上期底数</div>
                        <input type="text" name="start_num_p" value="{$info['start_num_p']??'--'}" autocomplete="off" class="layui-input">

                        <div class="layui-input-split layui-input-suffix">本期用量</div>
                        <input type="text" value="{$info['use_num_p']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">度</div>

                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-group start-end-time">
                        <div class="layui-input-split layui-input-prefix">&nbsp;&nbsp;谷&nbsp;&nbsp;&nbsp;&nbsp;</div>
                        <div class="layui-input-split layui-input-prefix">本期读数</div>
                        <input type="text" name="end_num_g" value="{$info['end_num_g']??'--'}" autocomplete="off" class="layui-input">

                        <div class="layui-input-split layui-input-suffix">上期底数</div>
                        <input type="text" name="start_num_g" value="{$info['start_num_g']??'--'}" autocomplete="off" class="layui-input">

                        <div class="layui-input-split layui-input-suffix">本期用量</div>
                        <input type="text" value="{$info['use_num_g']??'--'}" disabled  autocomplete="off" class="layui-input">
                        <div class="layui-input-split layui-input-suffix">度</div>

                    </div>
                </div>

                {else /}

                    {if $info['plan_record']['mode_type'] == 1 || $info['plan_record']['mode_type'] == 3}

                    <div class="layui-form-item">
                        <div class="layui-input-group start-end-time">
                            <div class="layui-input-split layui-input-prefix">&nbsp;&nbsp;基本价&nbsp;&nbsp;&nbsp;&nbsp;</div>
                            <input type="text" value="{$info['plan_record']['basic_price']??'--'}" disabled autocomplete="off" class="layui-input">
                            <div class="layui-input-split layui-input-suffix">¥</div>

                            {if $info['plan_record']['service_switch'] == 1}
                            <div class="layui-input-split layui-input-suffix">{$info['plan_record']['service_name']??'--'} </div>
                            <input type="text" value="{$info['plan_record']['service_price']??'--'}" disabled  autocomplete="off" class="layui-input">
                            <div class="layui-input-split layui-input-suffix">¥</div>
                            {/if}
                            {if $info['plan_record']['loss_switch'] == 1}
                            <div class="layui-input-split layui-input-suffix">{$info['plan_record']['loss_name']??'--'} </div>
                            <input type="text" value="{$info['plan_record']['loss_per']??'--'}" disabled  autocomplete="off" class="layui-input">
                            <div class="layui-input-split layui-input-suffix">%</div>
                            {/if}
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-group start-end-time">
                            <div class="layui-input-split layui-input-prefix">&nbsp;&nbsp;总&nbsp;&nbsp;&nbsp;&nbsp;</div>
                            <div class="layui-input-split layui-input-prefix">本期读数</div>
                            <input type="text" name="end_num_z" value="{$info['end_num_z']??'--'}" autocomplete="off" class="layui-input">

                            <div class="layui-input-split layui-input-suffix">上期底数</div>
                            <input type="text" name="start_num_z" value="{$info['start_num_z']??'--'}"  autocomplete="off" class="layui-input">

                            <div class="layui-input-split layui-input-suffix">本期用量</div>
                            <input type="text" value="{$info['use_num_z']??'--'}" disabled  autocomplete="off" class="layui-input">

                        </div>
                    </div>
                    {/if}

                {/if}
            {/if}

            {if $info['energy_id'] > 0}
            <div class="layui-form-item" pane="">
                <label class="layui-form-label indispensable">结算数据</label>
                <div class="layui-input-block">
                    <input type="radio" name="is_settle" lay-filter="is_settle" autocomplete="off" value="1" title="同步修改当前设备结算数据" >
                    <input type="radio" name="is_settle" lay-filter="is_settle" autocomplete="off" value="2" title="禁止修改"  checked>
                </div>
            </div>
            {/if}
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">备注说明</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入备注说明" class="layui-textarea" name="remark">{$info['remark']??''}</textarea>
                </div>
            </div>

            <div class="layui-form-item layui-hide">
                <button class="layui-btn" lay-submit lay-filter="submitBtn" id="submitBtn">提交</button>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    layui.use(['form', 'layer','laytpl'], function () {
        var form = layui.form,layer = layui.layer,  $ = layui.$,laytpl = layui.laytpl;
    });
</script>
{/block}